/**
 * @file drv_hc595_pcu.h
 * @brief 
 * @author wangh (wanghuan3037@fiberhome.com)
 * @version 1.0
 * @date 2020-10-22
 * @copyright Copyright (c) 2020  烽火通信
 */
#ifndef __DRV_HC595_PCU_H
#define __DRV_HC595_PCU_H 
#include "74HC595.h"

#define PCU_24V_EN              ((uint8_t)0x01)     ///< 24V输出
#define PCU_12VOUT1_EN          ((uint8_t)0x02)     ///< 12V输出1
#define PCU_12VOUT2_EN          ((uint8_t)0x04)     ///< 12V输出2
#define PCU_12VOUT3_EN          ((uint8_t)0x08)     ///< 12V输出3
#define PCU_485_VCC1_EN         ((uint8_t)0x10)     ///< 485电源输出1
#define PCU_485_VCC2_EN         ((uint8_t)0x20)     ///< 485电源输出2
#define PCU_AC_Ctr_ON           ((uint8_t)0x40)     ///< 交流输出开
#define PCU_AC_Ctr_OFF          ((uint8_t)0x80)     ///< 交流输出关
#define PCU_PWR_ALL_EN          ((uint8_t)0x7F)     ///< 电源输出全开

/**
 * @brief 电源输出控制初始化
 */
void drv_pwrCtr_init( void );

/**
 * @brief 电源输出控制使能
 * @param  mask        PCU_XX_EN的组合
 * @param  state       0:置低，非0：置高
 * @par 示例:
 * @code
 *    drv_pwrCtr_Set( PCU_24V_EN | PCU_12VOUT1_EN | PCU_485_VCC1_EN );
 * @endcode
 */
void drv_pwrCtr_Set( uint8_t mask, uint8_t state );

/**
 * @brief 获取电源输出当前状态
 */
void drv_pwrCtr_Get( uint8_t *mask );


#endif	 // __DRV_HC595_PCU_H 

/*********** (C) COPYRIGHT 2020 FiberHome *****END OF FILE****/
